﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Xml.Linq;

namespace CoreEx.Common.Repository
{
    public interface IRepository
    {                
        IList<T> Find<T>(Expression<Func<T, bool>> expression, params Expression<Func<T, object>>[] loadWith);        
        IList<T> FindAll<T>();
        void LoadWith<T>(Expression<Func<T, object>> expression);
        void Save(IList<IObjectState> changeRequests);
    }


    public interface IRepository_WCF
    {
        IList<T> Find<T>(XElement expression, params XElement[] loadWith);
    }
}
